import request from '@/utils/request'

export function fetchList(data) {
  return request({
    url: '/ibest/student/findByUpClassWithPage',
    method: 'post',
    data
  })
}

export function fetchAll(query) {
  return request({
    url: '/ibest/student/findAll',
    method: 'get'
  })
}

export function saveStudent(data) {
  return request({
    url: '/ibest/student/saveStudent',
    method: 'post',
    data
  })
}

export function deleteStudent(data) {
  return request({
    url: '/ibest/student/saveStudent',
    method: 'post',
    data
  })
}

export function batchSaveStudent(data) {
  return request({
    url: '/ibest/student/batchSaveStudent',
    method: 'post',
    data
  })
}

export function fetchArticle(id) {
  return request({
    url: '/article/detail',
    method: 'get',
    params: { id }
  })
}

export function fetchPv(pv) {
  return request({
    url: '/article/pv',
    method: 'get',
    params: { pv }
  })
}

export function createArticle(data) {
  return request({
    url: '/article/create',
    method: 'post',
    data
  })
}

export function updateArticle(data) {
  return request({
    url: '/article/update',
    method: 'post',
    data
  })
}
